From: Siegfried-Angel Gevatter Pujals Date: Sun, 9 Aug 2009 01:34:35 +0000 (+0200) Subject: Fix negative height request in WellGrid X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~11131 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4495f98dcec83c2726cedf9aba5afd3c1d97ddea;p=gnome-shell.git Fix negative height request in WellGrid When WellGrid had no child it was doing a division by zero, which screwed up the calculation for the height request and having it ask for a negative number. This commit fixes this by always requesting 0 in this case. --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f9924046f..1558f71f7 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -686,6 +686,8 @@ WellGrid.prototype = { let columnsNatural; let i; let children = this._getItemChildren(); + if (children.length == 0) + return [0, WELL_DEFAULT_COLUMNS, 0, 0]; let nColumns; if (children.length < WELL_DEFAULT_COLUMNS) nColumns = children.length;